home *** CD-ROM | disk | FTP | other *** search
- head 1.3;
- branch ;
- access ;
- symbols ;
- locks ; strict;
- comment @ * @;
-
-
- 1.3
- date 90.09.24.14.40.31; author douglis; state Exp;
- branches ;
- next 1.2;
-
- 1.2
- date 89.10.17.08.06.57; author douglis; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 89.09.11.11.46.08; author douglis; state Exp;
- branches ;
- next ;
-
-
- desc
- @process migration statistics
- @
-
-
- 1.3
- log
- @changes for migration stats
- @
- text
- @/*
- * rawproc.c --
- *
- * Print raw format PROC statistics.
- *
- * Copyright (C) 1986 Regents of the University of California
- * All rights reserved.
- */
-
- #ifndef lint
- static char rcsid[] = "$Header: /sprite/src/cmds/rawstat/RCS/rawproc.c,v 1.2 89/10/17 08:06:57 douglis Exp Locker: douglis $ SPRITE (Berkeley)";
- #endif not lint
-
- #include "sprite.h"
- #include "stdio.h"
- #include "sysStats.h"
- #include "kernel/procMigrate.h"
-
-
- /*
- *----------------------------------------------------------------------
- *
- * PrintRawProcMigStat --
- *
- * Prints proc_MigStats.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
- PrintRawProcMigStat()
- {
- Proc_MigStats stats; /* statistics buffer */
- Proc_MigStats *X = &stats;
- int status;
-
- /*
- * Get a copy of the trace table. Make sure it's zeroed in case the
- * kernel provides us with a shorter (older) structure.
- */
-
- bzero((Address) &stats, sizeof(stats));
- status = Sys_Stats(SYS_PROC_MIGRATION, SYS_PROC_MIG_GET_STATS,
- (Address) &stats);
- if (status != SUCCESS) {
- return;
- }
- if (stats.statsVersion != PROC_MIG_STATS_VERSION) {
- return;
- }
-
- printf("proc_MigStats\n");
-
-
- ZeroPrint("statsVersion %8u\n", X->statsVersion);
- ZeroPrint("foreign %8u\n", X->foreign);
- ZeroPrint("remote %8u\n", X->remote);
- ZeroPrint("exports %8u\n", X->exports);
- ZeroPrint("execs %8u\n", X->execs);
- ZeroPrint("imports %8u\n", X->imports);
- ZeroPrint("errors %8u\n", X->errors);
- ZeroPrint("evictions %8u\n", X->varStats.evictions);
- ZeroPrint("evictions:squared %8u\n", X->squared.evictions);
- ZeroPrint("returns %8u\n", X->returns);
- ZeroPrint("pagesWritten %8u\n", X->varStats.pagesWritten);
- ZeroPrint("pagesWritten:squared %8u\n", X->squared.pagesWritten);
-
- ZeroPrint("timeToMigrate %8u\n", X->varStats.timeToMigrate);
- ZeroPrint("timeToMigrate:squared %8u\n", X->squared.timeToMigrate);
- ZeroPrint("timeToExec %8u\n", X->varStats.timeToExec);
- ZeroPrint("timeToExec:squared %8u\n", X->squared.timeToExec);
- ZeroPrint("timeToEvict %8u\n", X->varStats.timeToEvict);
- ZeroPrint("timeToEvict:squared %8u\n", X->squared.timeToEvict);
- ZeroPrint("totalEvictTime %8u\n", X->varStats.totalEvictTime);
- ZeroPrint("totalEvictTime:squared %8u\n", X->squared.totalEvictTime);
- ZeroPrint("totalCPUTime %8u\n", X->varStats.totalCPUTime);
- ZeroPrint("totalCPUTime:squared %8u\n", X->squared.totalCPUTime);
- ZeroPrint("remoteCPUTime %8u\n", X->varStats.remoteCPUTime);
- ZeroPrint("remoteCPUTime:squared %8u\n", X->squared.remoteCPUTime);
- ZeroPrint("evictionCPUTime %8u\n", X->varStats.evictionCPUTime);
- ZeroPrint("evictionCPUTime:squared %8u\n", X->squared.evictionCPUTime);
- ZeroPrint("rpcKbytes %8u\n", X->varStats.rpcKbytes);
- ZeroPrint("rpcKbytes:squared %8u\n", X->squared.rpcKbytes);
- ZeroPrint("migrationsHome %8u\n", X->migrationsHome);
- ZeroPrint("evictCalls %8u\n", X->evictCalls);
- ZeroPrint("evictsNeeded %8u\n", X->evictsNeeded);
- ZeroPrint("evictionsToUs %8u\n", X->evictionsToUs);
- ZeroPrint("processes %8u\n", X->processes);
- }
- @
-
-
- 1.2
- log
- @print some more stats
- @
- text
- @d11 1
- a11 1
- static char rcsid[] = "$Header: /a/newcmds/rawstat/RCS/rawproc.c,v 1.1 89/09/11 11:46:08 douglis Exp Locker: douglis $ SPRITE (Berkeley)";
- d53 1
- a53 3
- #define WANT_VERSION 1
- #ifdef WANT_VERSION
- if (stats.statsVersion != WANT_VERSION) {
- a55 1
- #endif
- d67 2
- a68 1
- ZeroPrint("evictions %8u\n", X->evictions);
- d70 2
- a71 1
- ZeroPrint("pagesWritten %8u\n", X->pagesWritten);
- d73 16
- a88 12
- #define TimePrint(string, time) \
- ZeroPrint(string, (time).seconds * 1000000 + (time).microseconds)
-
- TimePrint("timeToMigrate %8u\n", X->timeToMigrate);
- TimePrint("timeToExec %8u\n", X->timeToExec);
- TimePrint("timeToEvict %8u\n", X->timeToEvict);
- X->totalCPUTime.time.seconds += X->totalCPUTime.time.microseconds / 1000000;
- X->remoteCPUTime.time.seconds += X->remoteCPUTime.time.microseconds / 1000000;
- ZeroPrint("totalCPUTime %8u\n", X->totalCPUTime.time.seconds);
- ZeroPrint("remoteCPUTime %8u\n", X->remoteCPUTime.time.seconds);
-
- ZeroPrint("rpcKbytes %8u\n", X->rpcKbytes);
- d92 2
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d11 1
- a11 1
- static char rcsid[] = "$Header: /a/newcmds/rawstat/RCS/rawproc.c,v 1.2 89/06/23 16:47:43 brent Exp $ SPRITE (Berkeley)";
- d53 6
- d63 1
- d77 1
- a77 1
- TimePrint("timeToExport %8u\n", X->timeToExport);
- d80 4
- @
-